Optimal. Leaf size=72 \[ -\frac {\sqrt {2} a \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d}+\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {2 a \sqrt {d \tan (e+f x)}}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3609, 3613,
214} \begin {gather*} \frac {2 a \sqrt {d \tan (e+f x)}}{f}-\frac {\sqrt {2} a \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d} \tan (e+f x)+\sqrt {d}}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3609
Rule 3613
Rubi steps
\begin {align*} \int \sqrt {d \tan (e+f x)} (a+a \tan (e+f x)) \, dx &=\frac {2 a \sqrt {d \tan (e+f x)}}{f}+\int \frac {-a d+a d \tan (e+f x)}{\sqrt {d \tan (e+f x)}} \, dx\\ &=\frac {2 a \sqrt {d \tan (e+f x)}}{f}-\frac {\left (2 a^2 d^2\right ) \text {Subst}\left (\int \frac {1}{-2 a^2 d^2+d x^2} \, dx,x,\frac {-a d-a d \tan (e+f x)}{\sqrt {d \tan (e+f x)}}\right )}{f}\\ &=-\frac {\sqrt {2} a \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d}+\sqrt {d} \tan (e+f x)}{\sqrt {2} \sqrt {d \tan (e+f x)}}\right )}{f}+\frac {2 a \sqrt {d \tan (e+f x)}}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.11, size = 92, normalized size = 1.28 \begin {gather*} \frac {(1+i) a \left (\sqrt [4]{-1} \text {ArcTan}\left ((-1)^{3/4} \sqrt {\tan (e+f x)}\right )-(-1)^{3/4} \tanh ^{-1}\left ((-1)^{3/4} \sqrt {\tan (e+f x)}\right )+(1-i) \sqrt {\tan (e+f x)}\right ) \sqrt {d \tan (e+f x)}}{f \sqrt {\tan (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(287\) vs.
\(2(59)=118\).
time = 0.23, size = 288, normalized size = 4.00
method | result | size |
derivativedivides | \(\frac {a \left (2 \sqrt {d \tan \left (f x +e \right )}-2 d \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) | \(288\) |
default | \(\frac {a \left (2 \sqrt {d \tan \left (f x +e \right )}-2 d \left (\frac {\left (d^{2}\right )^{\frac {1}{4}} \sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 d}-\frac {\sqrt {2}\, \left (\ln \left (\frac {d \tan \left (f x +e \right )-\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}{d \tan \left (f x +e \right )+\left (d^{2}\right )^{\frac {1}{4}} \sqrt {d \tan \left (f x +e \right )}\, \sqrt {2}+\sqrt {d^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {d \tan \left (f x +e \right )}}{\left (d^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{8 \left (d^{2}\right )^{\frac {1}{4}}}\right )\right )}{f}\) | \(288\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 106, normalized size = 1.47 \begin {gather*} -\frac {a d^{2} {\left (\frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}} - \frac {\sqrt {2} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} + d\right )}{\sqrt {d}}\right )} - 4 \, \sqrt {d \tan \left (f x + e\right )} a d}{2 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.54, size = 167, normalized size = 2.32 \begin {gather*} \left [\frac {\sqrt {2} a \sqrt {d} \log \left (\frac {d \tan \left (f x + e\right )^{2} - 2 \, \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {d} {\left (\tan \left (f x + e\right ) + 1\right )} + 4 \, d \tan \left (f x + e\right ) + d}{\tan \left (f x + e\right )^{2} + 1}\right ) + 4 \, \sqrt {d \tan \left (f x + e\right )} a}{2 \, f}, \frac {\sqrt {2} a \sqrt {-d} \arctan \left (\frac {\sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {-d} {\left (\tan \left (f x + e\right ) + 1\right )}}{2 \, d \tan \left (f x + e\right )}\right ) + 2 \, \sqrt {d \tan \left (f x + e\right )} a}{f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \sqrt {d \tan {\left (e + f x \right )}}\, dx + \int \sqrt {d \tan {\left (e + f x \right )}} \tan {\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 249 vs.
\(2 (62) = 124\).
time = 0.60, size = 249, normalized size = 3.46 \begin {gather*} \frac {2 \, \sqrt {d \tan \left (f x + e\right )} a}{f} - \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} - a {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} + 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{2 \, d f} - \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} - a {\left | d \right |}^{\frac {3}{2}}\right )} \arctan \left (-\frac {\sqrt {2} {\left (\sqrt {2} \sqrt {{\left | d \right |}} - 2 \, \sqrt {d \tan \left (f x + e\right )}\right )}}{2 \, \sqrt {{\left | d \right |}}}\right )}{2 \, d f} - \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} + a {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) + \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{4 \, d f} + \frac {\sqrt {2} {\left (a d \sqrt {{\left | d \right |}} + a {\left | d \right |}^{\frac {3}{2}}\right )} \log \left (d \tan \left (f x + e\right ) - \sqrt {2} \sqrt {d \tan \left (f x + e\right )} \sqrt {{\left | d \right |}} + {\left | d \right |}\right )}{4 \, d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.46, size = 125, normalized size = 1.74 \begin {gather*} \frac {2\,a\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{f}+\frac {{\left (-1\right )}^{1/4}\,a\,\sqrt {d}\,\left (\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )-\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\right )}{f}+\frac {{\left (-1\right )}^{1/4}\,a\,\sqrt {d}\,\mathrm {atan}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,1{}\mathrm {i}}{f}+\frac {{\left (-1\right )}^{1/4}\,a\,\sqrt {d}\,\mathrm {atanh}\left (\frac {{\left (-1\right )}^{1/4}\,\sqrt {d\,\mathrm {tan}\left (e+f\,x\right )}}{\sqrt {d}}\right )\,1{}\mathrm {i}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________